<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('videos', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->integer('duration')->default(0);
            $table->integer('size')->default(0);
            $table->string('file_url')->nullable();
            $table->string('play_url',1000)->nullable();
            $table->string('file_id')->nullable();
            $table->integer('sort')->default(0);
            $table->tinyInteger('status')->default(0)->comment('状态 0未上架 1 已上架');
            $table->text('results')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('videos');
    }
};
